#ifndef ZUCPOSE_H
#define ZUCPOSE_H

#include "zuc/nml_intf/zucpos.h"
#include "posemath.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum
{
    ZUCPOSE_ERR_OK = 0,
    ZUCPOSE_ERR_FAIL = -1,
    ZUCPOSE_ERR_INPUT_MISSING = -2,
    ZUCPOSE_ERR_OUTPUT_MISSING = -3,
    ZUCPOSE_ERR_ALL
} ZucPoseErr;

void zucPoseZero(ZucPose* const pos);

int zucPoseAdd(ZucPose const* const p1, ZucPose const* const p2, ZucPose* const out);
int zucPoseSub(ZucPose const* const p1, ZucPose const* const p2, ZucPose* const out);

int zucPoseToPmCartesian(ZucPose const* const pose, PmCartesian* const xyz, PmCartesian* const abc, PmCartesian* const uvw);
int pmCartesianToZucPose(PmCartesian const* const xyz, PmCartesian const* const abc, PmCartesian const* const uvw, ZucPose* const pose);

int zucPoseSelfAdd(ZucPose* const self, ZucPose const* const p2);
int zucPoseSelfSub(ZucPose* const self, ZucPose const* const p2);

int zucPoseSetXYZ(PmCartesian const* const xyz, ZucPose* const pose);
int zucPoseSetABC(PmCartesian const* const abc, ZucPose* const pose);
int zucPoseSetUVW(PmCartesian const* const uvw, ZucPose* const pose);

int zucPoseGetXYZ(ZucPose const* const pose, PmCartesian* const xyz);
int zucPoseGetABC(ZucPose const* const pose, PmCartesian* const abc);
int zucPoseGetUVW(ZucPose const* const pose, PmCartesian* const uvw);

int zucPoseMagnitude(ZucPose const* const pose, double* const out);

int zucPoseValid(ZucPose const* const pose);
ZucPose zucPoseMult(const ZucPose& left, const ZucPose& right);
void printZucPose(ZucPose* pose);
#ifdef __cplusplus
}
#endif
#endif
